.Net Framework > v3.5.21022.8 > System > Linq > Enumerable > FirstOrDefault<TSource> FirstOrDefault<TSource>(IEnumerable<TSource>)
FirstOrDefault<TSource>(IEnumerable<TSource>,Func<TSource,Boolean>)


FirstOrDefault<TSource>(IEnumerable<TSource>)

Category
Method
Description
Returns the first element of a sequence, or a default value if the sequence contains no elements.
Type
TSource
Character
public, static
Parameters
NameTypeDescription
sourceSystem.Collections.Generic.IEnumerable<TSource>
Attributes
NameValue/Assignment
ExtensionAttribute
Tags
01892ABD01, 02E3ABA98D, 0322962271

FirstOrDefault<TSource>(IEnumerable<TSource>,Func<TSource,Boolean>)

Category
Method
Description
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
Type
TSource
Character
public, static
Parameters
NameTypeDescription
sourceSystem.Collections.Generic.IEnumerable<TSource>
predicateSystem.Func<TSource,Boolean>
Attributes
NameValue/Assignment
ExtensionAttribute
Tags
01892ABD01, 02E3ABA98D, 0322962271

Software for developers
.Net Components
Delphi Components
Software for Android Developers
More information resources
WinAPI Programmer's Reference
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database